package acwing._2LanQiao._12No12;
/**
 * @Project : AlgorithmLearning
 * @Package : ACWing._2LanQiao._12No12
 * @File : Q3416.java
 * @Author : WangRuoyu
 * @Date 2023/3/27 23:05
 */

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Q3416 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] words = br.readLine().split(" ");
        long x = Long.parseLong(words[0]);

        x /= 1000;
        long second = x % 60;
        x /= 60;
        long min = x % 60;
        x /= 60;
        long hour = x % 24;
        System.out.printf("%02d:%02d:%02d",hour,min,second);
    }
}
